<?php
/**
 * Created by PhpStorm.
 * User: CaiJianling
 * Date: 2018/7/30
 * Time: 15:11
 */

session_start();
header('content-type:text/html;charset=utf-8');
///*当前页面代码顶部*/
////开启php缓存
//if (extension_loaded('zlib')) {
//    ob_end_clean();
//    ob_start('ob_gzhandler');
//} else {
//    ob_end_clean();
//    ob_start();
//}
if ($_SERVER['HTTP_HOST'] == 'localhost') {
    $php_shelf_host = '/posterPHP';

} else {
    $php_shelf_host = '';
}

if ($_SERVER['PHP_SELF'] != $php_shelf_host . '/form.php' &&
    $_SERVER['PHP_SELF'] != $php_shelf_host . '/index.php' &&
    $_SERVER['PHP_SELF'] != $php_shelf_host . '/share.php' &&
    $_SERVER['PHP_SELF'] != $php_shelf_host . '/success.php') {
    if (isset($_SESSION['save'])) {
        if ($_SESSION['save'] == 1){
            ?>
            <script>
                window.location.href = "./admin/my.php";
            </script>
            <?php
            exit();
        }
    }
    if (!isset($_SESSION['f-uid']) || !isset($_SESSION['f-fid'])) {
        ?>
        <script>
            alert('请登陆后点击海报制作');
            window.location.href = "./admin/my.php";
        </script>
        <?php
        exit();
    }
}
?>


<link rel="icon" type="image/png" href="./admin/assets/i/favicon.png">
<link rel="apple-touch-icon-precomposed" href="./admin/assets/i/app-icon72x72@2x.png">

